package com.aaa.yilaidaozhi;

import java.time.Period;

public class Email {
    public String getInfo(){
        return "邮箱：hello,world";
    }
}

class Weixin{
    public String getInfo(){
        return "微信：hello,微信";
    }
}

class Person{
    public void receive(Email email){
        System.out.println("收到："+email.getInfo());
    }

    public void receive(Weixin email){
        System.out.println("收到："+email.getInfo());
    }

    public void receive(FeiQiu feiQiu) {
    }
}

// 微信消息

class Test{
    public static void main(String[] args) {
        Person person = new Person();
        Email email = new Email();
        Weixin wx = new Weixin();
        person.receive(email);
        person.receive(wx);
    }
}


